package com.tangyuan.model;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
* 用户表
* @TableName user
*/
@Data
@TableName("user")
public class User implements Serializable {


    public static final String IS_READ_NOTICE = "is_read_notice";
    public static final String BIRTH_DAY = "birth_day";
    public static final String SEX = "sex";
    public static final String NAME = "name";
    public static final String HEAD_IMAGE = "head_image";
    public static final String PASSWORD = "password";
    /**唯一ID*/
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "唯一ID")
    private Long id;
    /**账号*/
    @ApiModelProperty(value = "账号")
    private String account;
    /**微信openId*/
    @ApiModelProperty(value = "微信openId")
    private String loginName;
    /**密码*/
    @ApiModelProperty(value = "密码")
    private String password;
    /**密码盐*/
    @ApiModelProperty(value = "密码盐")
    private String salt;
    /**手机号*/
    @ApiModelProperty(value = "手机号")
    private String mobile;
    /**昵称*/
    @ApiModelProperty(value = "昵称")
    private String name;
    /**性别 1男 2女*/
    @ApiModelProperty(value = "性别 1男 2女")
    private Integer sex;
    /**是否删除*/
    @ApiModelProperty(value = "是否删除")
    private Integer isDeleted;
    /**是否锁定*/
    @ApiModelProperty(value = "是否锁定")
    private Integer isLocked;
    /**头像*/
    @ApiModelProperty(value = "头像")
    private String headImage;
    /**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
    /**创建时间*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    /**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
    /**更新时间*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;
    /**省*/
    @ApiModelProperty(value = "省")
    private String province;
    /**市*/
    @ApiModelProperty(value = "市")
    private String city;
    /**县*/
    @ApiModelProperty(value = "县")
    private String country;
    /**
     *  街道
     */
    @JsonInclude(JsonInclude.Include.ALWAYS)
    @ApiModelProperty(value = "街道")
    private String street;
    /**openId*/
    @ApiModelProperty(value = "openId")
    private String openId;
    private String iosId;
    /**unionId*/
    @ApiModelProperty(value = "unionId")
    private String unionId;
    /**answerNum*/
    @ApiModelProperty(value = "answerNum")
    private Integer answerNum;
    /**accurate*/
    @ApiModelProperty(value = "accurate")
    private java.math.BigDecimal accurate;
    /**spreadId*/
    @ApiModelProperty(value = "spreadId")
    private Integer spreadId;
    /**punchNum*/
    @ApiModelProperty(value = "punchNum")
    private Integer punchNum;
    /**totalPunch*/
    @ApiModelProperty(value = "totalPunch")
    private Integer totalPunch;
    /**changeMobile*/
    @ApiModelProperty(value = "changeMobile")
    private Integer changeMobile;
    /**correctNum*/
    @ApiModelProperty(value = "correctNum")
    private Integer correctNum;
    /**incorrectNum*/
    @ApiModelProperty(value = "incorrectNum")
    private Integer incorrectNum;
    /**remark*/
    @ApiModelProperty(value = "remark")
    private String remark;
    /**邀请码*/
    @ApiModelProperty(value = "邀请码")
    private String invitationCode;
    /**获赞数*/
    @ApiModelProperty(value = "获赞数")
    private String likeNum;
    /**integral*/
    @ApiModelProperty(value = "integral")
    private Integer integral;
    /**birthDay*/
    @ApiModelProperty(value = "birthDay")
    private String birthDay;
    /**家长手机号*/
    @ApiModelProperty(value = "家长手机号")
    private String parentMobile;
    /**1学生2老师*/
    @ApiModelProperty(value = "1学生2老师")
    private Integer userType;
    /**登陆时间*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "登陆时间")
    private Date loginTime;
    /**登出时间*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "登出时间")
    private Date logoutTime;
    /**是否显示定位：0否1是*/
    @ApiModelProperty(value = "是否显示定位：0否1是")
    private Integer showLocation;
    /**腾讯userSig*/
    @ApiModelProperty(value = "腾讯userSig")
    private String userSig;
    /**用户类型 0正常用户 1机器人用户*/
    @ApiModelProperty(value = "用户类型 0正常用户 1机器人用户")
    private Integer type;
    /**用户支付密码*/
    @ApiModelProperty(value = "用户支付密码")
    private String payPwd;
    /**管理员标识 0否 1是 默认0*/
    @ApiModelProperty(value = "管理员标识 0否 1是 默认0")
    private int adminFlag;
    /**是否已读安全须知 0.未读 1.已读*/
    @ApiModelProperty(value = "是否已读安全须知 0否 1是 默认0")
    private Integer isReadNotice;

    /**是否第一次登录 0.否 1.是*/
    @ApiModelProperty(value = "是否第一次登录 0否 1是 默认0")
    private Integer isFirstLogin;
    /**直播权限 0,是 1.否*/
    @ApiModelProperty(value = "直播权限 0,是 1.否")
    private Integer livePermissions;
    /**是否创建IM账号 0.是 1.否*/
    @ApiModelProperty(value = "直播权限 0,是 1.否")
    private Integer isCreateIm;

    @TableField(exist = false)
    private String registCode;
    @TableField(exist = false)
    private String token;
    @TableField(exist = false)
    private Boolean otherDeviceOnline = false;

}